<?php
namespace app\wempapi\controller;

use app\common\controller\Frontend;
use app\wempapi\model\Inform;


class Notice extends Frontend
{
    protected array $noNeedLogin = ['*'];
   
    public function index(){
        $page = $this->request->param('page',1);
        $notice = Inform::where('status',1)->page($page,10)->select();
        $this->success('ok',$notice);
    }

    public function detail(){
        $id = $this->request->param('id');
        $notice = Inform::where('id',$id)->find();
        $this->success('ok',$notice);
    }
}